import { createApp } from "vue"

import ElementPlus from "element-plus"
import "element-plus/dist/index.css"
import zhCn from "element-plus/es/locale/lang/zh-cn"

import App from "./App.vue"
import router from "./router"
import { store,key } from "./store"
import "./styles/index.scss"
import SvgIcon from "@/components/svgIcon/Index.vue"

const app = createApp(App)

app.use(ElementPlus,{locale: zhCn})

app.use(router)
// 传入 injection key
app.use(store,key)

// 全局组件祖册
// app.component('svg-icon', SvgIcon)
app.component(
  'SvgIcon',
  // 如果这个组件选项是通过 `export default` 导出的，那么就会优先使用 `.default`，否则回退到使用模块的根
  SvgIcon.default || SvgIcon
)

app.mount('#app')
